14. Getting Started: Images

IIIF does not mandate a particular image format for serving images.

However, there are two formats that are particularly suitable, as they are pyramidal formats that can provide multiple resolutions, and extracted tiles easily and efficiently.

In the repository of simple scripts created to go along with this workshop:

https://github.com/mattmcgrattan/oslo_demos

I provide some very simple shell scripts that will use:

This workshop isn't the right place to describe how you might install the right dependencies for this, but I have provided some links.

Generating Pyramid Tiffs Using VIPS

The shell script provided in this repository will generate pyramid tiffs which can be used to server IIIF Image API requests.

Installing VIPS

https://jcupitt.github.io/libvips/install.html

The instructions at the above link are comprehensive.

Running the script

sh ./vips_tiff.sh INPUT_FILE OUTPUT_FILE

Generating Jpeg2000s using OpenJPEG

Installing OpenJPEG

Building OpenJPEG from source is not easy.

Instructions can be found:

https://github.com/uclouvain/openjpeg/blob/master/INSTALL.md

On a Mac with Homebrew installed, you can do:

brew install openjpeg

Running the shell script

The shell script provided in this repository will generate a JPEG2000 with lossy compression.

sh ./open_jpeg.sh INPUT_FILE OUTPUT_FILE

N.B. the shell script expects to write temporary files to /tmp but this can easily be changed to wherever you wish.

Generate Jpeg2000s using Kakadu

The shell script assumes you have Imagemagick installed.

https://imagemagick.org/script/download.php

You must also have the Kakadu binaries in your path.

http://kakadusoftware.com/downloads/

Using the shell script

The shell script provided in this repository will generate a JPEG2000 with lossy compression.

sh ./kakadu_gen.sh INPUT_FILE OUTPUT_FILE

N.B. the shell script expects to write temporary files to /tmp but this can easily be changed to wherever you wish.